home *** CD-ROM | disk | FTP | other *** search
/ Experimental BBS Explossion 3 / Experimental BBS Explossion III.iso / msdos / axsmycfg.zip / MYC.BAT < prev    next >
DOS Batch File  |  1993-05-01  |  12KB  |  371 lines

  1. @echo off
  2. cls
  3.  
  4. C:
  5. if not exist C:\myc\nul MD C:\myc
  6. CD\myc
  7. rem dir C:\myc /W /A-D
  8.  
  9. rem  *---------------------------------------------------------------------*
  10. rem  * Multiple configurations                                             *
  11. REM  * (to add other configurations, edit the extra1,2,or 3 options AND..  *
  12. REM  * write the appropriate config.sys and autoexec.bat substitute files. *
  13. rem  *---------------------------------------------------------------------*
  14.  
  15. if "%1"=="?" goto help
  16. if "%1"=="/?" goto help
  17. if "%1"=="" goto pickcf
  18. if "%1"=="d" goto dirmyc
  19. if "%1"=="D" goto dirmyc
  20. if "%1"=="A" goto allmsoft
  21. if "%1"=="a" goto allmsoft
  22. if "%1"=="B" goto best
  23. if "%1"=="b" goto best
  24. if "%1"=="p" goto pickcf
  25. if "%1"=="P" goto pickcf
  26. if "%1"=="m" goto mini
  27. if "%1"=="M" goto mini
  28. if "%1"=="r" goto ramdrive
  29. if "%1"=="R" goto ramdrive
  30. if "%1"=="L" goto lastcfg
  31. if "%1"=="l" goto lastcfg
  32. if "%1"=="U" goto Utility
  33. if "%1"=="u" goto Utility
  34. rem --------------------------edit extra1,2,3 below to add more options---
  35. if "%1"=="e" goto extra1
  36. if "%1"=="E" goto EXTRA1
  37. if "%1"=="e" goto extra2
  38. if "%1"=="E" goto EXTRA2
  39. if "%1"=="e" goto extra3
  40. if "%1"=="E" goto EXTRA3
  41.  
  42.  
  43. :help
  44.    cls
  45.    echo.
  46.    echo *---------------------------------------------------------------------*
  47.    echo ! HELP & INFORMATION   Myc.Bat reconfigures system by copying files   !
  48.    echo ! ABOUT MYC.BAT        to make alternate AUTOEXEC.BAT and CONFIG.SYS  !
  49.    echo *---------------------------------------------------------------------*
  50.    echo.
  51.    rem  --if Extra1,2,3 options used, add to appropriate new names below------
  52.    echo         Parameters --Effect
  53.    echo         ----------------------------------------------------
  54.    echo            /? or ? --Help
  55.    echo                  D --Directory listing of MYC dir
  56.    echo                  C --C Language optimum programming Config.
  57.    echo                  P --Pick (Menu) P same as no parameter
  58.    echo                  A --All microsoft DOS--No other utiilities
  59.    echo                  B --Best (Memory optimized,Dos High, Etc)
  60.    echo                  L --last configuration (switch between 2 options)
  61.    echo                  R --Ramdrive added
  62.    echo                  M --Minimum, no TSRS, No HiMem etc.
  63.    echo                  U --Utility Menu--MYC copy, etc.
  64.    echo        ----------------------------------------------------  
  65.    echo        (NOTE: Menu options and Parameters parallel each other)
  66.    echo.
  67.    echo    SYNTAX----- MYC PARAMETER     Example---  myc ?
  68.    echo.
  69.    choice /C:XP  Enter X to Exit.. or P for Pick-Menu 
  70.    if errorlevel 2 goto pickcf
  71.    goto endgate
  72.  
  73. :pickcf
  74. rem -----if extra1,2,or3 amended, add letters to option menu below and add---
  75. rem --- and\or correct the choice command line and errorlevel commands below---
  76. echo.
  77. echo     PICK CONFIGURATION OPTIONS
  78. echo   *-----------------------------*
  79. echo   *   H  Help                   *
  80. echo   *   D  Directory of MYC       *
  81. echo   *   A  AllMicroSoft           *
  82. echo   *   B  Best                   *
  83. echo   *   C  C-Language Programming *
  84. echo   *   R  Ramdrive added         *
  85. echo   *   L  Last configuration     *
  86. echo   *   M  Minimum-No TSRS etc    *
  87. echo   *   U  Utility-MYC edit etc.  *
  88. echo   *   X  Exit--no changes       *
  89. echo   *-----------------------------*
  90. echo    E(X)it  in 10 seconds or...
  91. choice /C:HBRLMCDAUX /T:X,10 ...SELECT:  
  92.   if errorlevel 10 goto endgate
  93.   if errorlevel 9 goto utility
  94.   if errorlevel 8 goto allmsoft
  95.   if errorlevel 7 goto Dirmyc
  96.   if errorlevel 6 goto clang
  97.   if errorlevel 5 goto mini
  98.   if errorlevel 4 goto lastcfg
  99.   if errorlevel 3 goto Ramdrive
  100.   if errorlevel 2 goto best
  101.   if errorlevel 1 goto help
  102.  
  103. :Utility
  104.   cls
  105.   echo.
  106.   echo             UTILITY OPEN MENU
  107.   echo  -----------------------------------------------------------------    
  108.   echo  Selecting (C)opy opens a menu allowing copying of current
  109.   echo                  configuration to a MYC stored configuration file.
  110.   echo  Selecting (E)dit opens a menu allowing editing the stored
  111.   echo                  MYC configuration files. 
  112.   echo  Selecting e(X)it  returns you to Main MYC PICK MENU
  113.   echo -------------------------------------------------------------------
  114.   echo.
  115.   echo  Will e(X) to Main Menu in 30 seconds or..
  116.   Choice /C:CEX /T:X,30 . SELECT-  
  117.   if errorlevel 3 goto pickcf
  118.   if errorlevel 2 goto UtilEdit
  119.   if errorlevel 1 goto UtilCopy
  120.   goto endgate
  121.  
  122. :UtilCopy
  123. Cls
  124. echo.
  125. echo    The Copy options will COPY the current Autoexec.Bat to
  126. echo       (Pick).BAT ...and... COPY Config.Sys to (Pick).SYS.
  127. echo.
  128. set MYCFG=
  129. echo     PICK COPY OPTIONS
  130. echo   *-------------------------------------*
  131. echo   *   V  View current AutoExec.Bat      *
  132. echo   *   S  See-View current Config.Sys    *
  133. echo   *   A  Copy to (AllMSoft)             *
  134. echo   *   B  Copy to (Best)                 *
  135. echo   *   C  Copy to (CLang)                *
  136. echo   *   R  Copy to (Ram) drive-added      *
  137. echo   *   M  Copy to (Mini)mum-No TSRS etc  *
  138. echo   *   Q  Return to UTILITY OPEN MENU    *
  139. echo   *   X  Exit--return to MYC Main Menu  *
  140. echo   *-------------------------------------*
  141. echo    E(X)it  in 30 seconds or...
  142. choice /C:ABCRMVSQX /T:X,30 ...SELECT:  
  143.   if errorlevel 9 goto pickcf
  144.   if errorlevel 8 goto utility
  145.   if errorlevel 7 goto SeeSYS
  146.   if errorlevel 6 goto VuBAT
  147.   if errorlevel 1 set MYCFG=allmsoft
  148.   if errorlevel 2 set MYCFG=best
  149.   if errorlevel 3 set MYCFG=Clang
  150.   if errorlevel 4 set MYCFG=Ram
  151.   if errorlevel 5 set MYCFG=mini
  152.   echo.
  153.   echo **** Press C to COPY C:\AUTOEXEC.BAT to  C:\MYC\%MYCFG%.BAT ,
  154.   echo            or Press N to NOT COPY
  155.   echo.
  156.   Choice /C:CN /T:C,20 ..PRESS..
  157.   if errorlevel 2 goto skipauto
  158.   if exist C:\AUTOEXEC.BAT COPY C:\AUTOEXEC.BAT C:\MYC\%MYCFG%.BAT
  159. :skipauto  
  160.   echo.
  161.   echo **** Press C to COPY C:\CONFIG.SYS to  C:\MYC\%MYCFG%.SYS ,
  162.   echo            or Press N to NOT COPY
  163.   echo.
  164.   Choice /C:CN /T:C,10 ..PRESS..
  165.   if errorlevel 2 goto skipsys     
  166.   if exist C:\CONFIG.SYS COPY C:\CONFIG.SYS C:\MYC\%MYCFG%.SYS
  167. :skipsys  
  168.   SET MYCFG=
  169.   echo.
  170.   echo  ***** To return to main menu,
  171.   pause
  172.   goto pickcf
  173.   goto endgate
  174.  
  175. :SeeSYS
  176.   CLS
  177.   if exist C:\CONFIG.SYS MORE<C:\CONFIG.SYS
  178.   echo ------------------------------------
  179.   echo ***** To return to PICK COPY OPTIONS,
  180.   pause
  181.   goto UTILCOPY
  182.  
  183. :VuBAT
  184.   CLS
  185.   if exist C:\AUTOEXEC.BAT   MORE < C:\AUTOEXEC.BAT
  186.   echo -------------------------------------
  187.   echo ***** To return to PICK COPY OPTIONS,
  188.   pause
  189.   goto UTILCOPY
  190.  
  191. :UtilEdit
  192. Cls
  193. echo.
  194. echo  Selecting an Edit option from this menu will LOAD the stored 
  195. echo  (Pick).BAT ...and.. (Pick).SYS into an editor.
  196. echo.
  197. echo     PICK Edit OPTIONS of .BAT & .SYS Files
  198. echo   *-------------------------------------*
  199. echo   *   A  Edit (AllMSoft)                *
  200. echo   *   B  Edit (Best)                    *
  201. echo   *   C  Edit (CLang)                   *
  202. echo   *   R  Edit to (Ram) drive-added      *
  203. echo   *   M  Edit to (Mini)mum-No TSRS etc  *
  204. echo   *   Q  Return to UTILITY OPEN MENU    *
  205. echo   *   X  Exit--return to MYC Main Menu  *
  206. echo   *-------------------------------------*
  207. echo    E(X)it  in 20 seconds or...
  208. choice /C:ABCRMQX /T:X,20 ...SELECT:  
  209.   if errorlevel 7 goto Pickcf
  210.   if errorlevel 6 goto utility
  211.   if errorlevel 1 set MYCFG=allmsoft
  212.   if errorlevel 2 set MYCFG=best
  213.   if errorlevel 3 set MYCFG=Clang
  214.   if errorlevel 4 set MYCFG=Ram
  215.   if errorlevel 5 set MYCFG=mini
  216.   echo.
  217.   echo **** Press E to EDIT C:\MYC\%MYCFG%.BAT ,
  218.   echo       or Press N to NOT EDIT
  219.   echo.
  220.   Choice /C:EN /T:E,20 ..PRESS..
  221.   if errorlevel 2 goto skedbat
  222.   if exist C:\MYC\%MYCFG%.BAT EDIT C:\MYC\%MYCFG%.BAT
  223.   :skedbat
  224.   echo.
  225.   echo **** Press E To EDIT C:\MYC\%MYCFG%.SYS ,
  226.   echo        or Press N to NOT EDIT
  227.   echo.
  228.   Choice /C:EN /T:E,20 ...PRESS...
  229.   if errorlevel 2 goto skedsys
  230.   if exist C:\MYC\%MYCFG%.SYS EDIT C:\MYC\%MYCFG%.SYS
  231.   :skedsys
  232.   echo.
  233.   echo  **** To return to main menu,
  234.   pause
  235.   set MYCFG=
  236.   goto pickcf
  237.   goto endgate
  238.  
  239. :dirmyc
  240.   cls
  241.   dir C:\myc /W /A-D
  242.   goto pickcf
  243.  
  244.   
  245. :Clang
  246.   SET MYCFG=CLANG
  247.   SET MYTITLE=C-LANGUAGE
  248.   echo    C-LANGUAGE CONFIGURATION > C:\myc\oneprior.txt 
  249.   GOTO DOCOPY
  250.  
  251.   goto endgate
  252.  
  253. :AllMSoft
  254.   SET MYCFG=ALLMSOFT
  255.   SET MYTITLE=ALL MICROSOFT
  256.   echo    ALL MICROSOFT (No Opts) CONFIGURATION > C:\myc\oneprior.txt 
  257.   GOTO DOCOPY
  258.  
  259.   goto endgate
  260.  
  261. :Ramdrive
  262.   SET MYCFG=RAM
  263.   SET MYTITLE=RAMDRIVE
  264.   echo    RAMDRIVE CONFIGURATION > C:\myc\oneprior.txt 
  265.   GOTO DOCOPY
  266.  
  267.   goto endgate
  268.  
  269. :best
  270.   SET MYCFG=BEST
  271.   SET MYTITLE=BEST (Optimized)
  272.   echo    BEST CONFIGURATION > C:\myc\oneprior.txt 
  273.   GOTO DOCOPY
  274.  
  275.   goto endgate
  276.  
  277. :Mini
  278.   SET MYCFG=MINI
  279.   SET MYTITLE=MINIMUM
  280.   echo    MINIMUM CONFIGURATION > C:\myc\oneprior.txt 
  281.   GOTO DOCOPY
  282.   goto endgate
  283.  
  284.  
  285. :Extra1
  286.   rem-------------------edit label and environmental names if amended----
  287.   SET MYCFG=EXTRA1
  288.   SET MYTITLE=EXTRA1TITLE
  289.   echo    EXTRA1 CONFIGURATION > C:\myc\oneprior.txt 
  290.   GOTO DOCOPY
  291.   goto endgate
  292.  
  293. :Extra2
  294.   rem-------------------edit label and environmental names if amended----
  295.   SET MYCFG=EXTRA2
  296.   SET MYTITLE=EXTRA2TITLE
  297.   echo    EXTRA2 CONFIGURATION > C:\myc\oneprior.txt 
  298.   GOTO DOCOPY
  299.   goto endgate
  300.  
  301. :Extra3
  302.   rem-------------------edit label and environmental names if amended----
  303.   SET MYCFG=EXTRA3
  304.   SET MYTITLE=EXTRA3TITLE
  305.   echo    EXTRA3 CONFIGURATION > C:\myc\oneprior.txt 
  306.   GOTO DOCOPY
  307.   goto endgate
  308.  
  309.  
  310. :Lastcfg
  311.   :message
  312.   cls
  313.   echo    In 5 seconds, system will
  314.   echo    be configured to
  315.   type    c:\myc\twoprior.txt
  316.   echo -- UNLESS you press  N   NOW!"
  317.   echo.
  318.   choice /C:.N /N /T:.,05
  319.   if errorlevel 2 goto pickcf
  320.   rem -------------rem goto message command after testing-------
  321.   rem goto message
  322.   echo .....Please wait as files are saved & copied..Then select reboot option.
  323.   echo ------------------------------------------------------------------------
  324.   if exist c:\myc\twoprior.txt copy c:\myc\twoprior.txt c:\myc\prior.tmp
  325.   if exist c:\myc\oneprior.txt copy c:\myc\oneprior.txt c:\myc\twoprior.txt
  326.   if exist c:\myc\prior.tmp copy c:\myc\prior.tmp c:\myc\oneprior.txt
  327.   if not exist C:\myc\nul md C:\myc
  328.   if exist C:\myc\autoexec.LST  copy C:\myc\autoexec.LST C:\myc\autoexec.TMP
  329.   if exist C:\myc\config.LST  copy C:\myc\config.LST  C:\myc\Config.TMP
  330.   copy C:\Autoexec.BAT C:\myc\AUTOEXEC.LST
  331.   copy C:\Config.SYS   C:\myc\Config.LST
  332.   if exist C:\myc\autoexec.TMP copy C:\myc\autoexec.TMP C:\autoexec.BAT
  333.   if exist C:\myc\config.SYS copy C:\myc\config.SYS C:\Config.SYS
  334.   goto bootopts
  335.   goto endgate
  336.  
  337. :DOCOPY
  338.   cls
  339.   echo    System will be configured to
  340.   echo    %MYTITLE% mode in 10 seconds
  341.   echo -- UNLESS you press  N   NOW!"
  342.   echo.
  343.   choice /C:.N /N /T:.,10
  344.   if errorlevel 2 goto pickcf
  345.   echo -----------------------------------------------------------------------
  346.   echo ....... Please wait for file copying and then reboot options ..........
  347.   echo -----------------------------------------------------------------------
  348.   ECHO %MYCFG%
  349.   COPY C:\AUTOEXEC.BAT C:\MYC\MYCBAT.SAV
  350.   COPY C:\CONFIG.SYS C:\MYC\MYCSYS.SAV
  351.   IF NOT EXIST C:\MYC\%MYCFG%.BAT ECHO %MYCFG%.BAT DOES NOT EXIST
  352.   IF NOT EXIST C:\MYC\%MYCFG%.SYS ECHO %MYCFG%.SYS DOES NOT EXIST
  353.   IF EXIST C:\MYC\%MYCFG%.BAT  COPY C:\MYC\%MYCFG%.BAT  C:\AUTOEXEC.BAT
  354.   IF EXIST C:\MYC\%MYCFG%.SYS  COPY C:\MYC\%MYCFG%.SYS  C:\CONFIG.SYS
  355.   GOTO BOOTOPTS
  356.  
  357. :bootopts
  358.   echo.
  359.   echo SELECT:                ------------------------------------------------
  360.   echo      (W)armboot        NOTE: Configuration has been changed, whether or
  361.   echo      (C)oldboot        not you do re-boot; but, changes will NOT take
  362.   echo     e(X)it             effect until system is re-booted or turned off
  363.   echo                        and restarted.
  364.   echo                        ------------------------------------------------
  365.   ECHO.
  366.   choice /C:WCX  /T:C,30 ..SELECT..
  367.   if errorlevel 3 goto endgate
  368.   if errorlevel 2 Coldboot.Com
  369.   if errorlevel 1 Warmboot.Com
  370.  
  371. :endgate